/**
 * @file SetPresenceHandler.cs
 * @author Zane Mayo
 * @date 26/5/2009
 */

using System;

namespace MxitAPI {
	
	
	public class SetPresenceHandler : Handler {
		
		private static log4net.ILog log = log4net.LogManager.GetLogger( System.Reflection.MethodBase.GetCurrentMethod().DeclaringType );
		
		private Presence presence;
		private string status;
		
		public SetPresenceHandler() : base( typeof( SetPresenceProtocolMessage ) )  {
			
		}
		
		public SetPresenceHandler( Presence presence, string status ) : this() {
			this.presence = presence;
			this.status = status;
		}
		
		public override ProtocolMessage CreateRequestProtocolMessage() {
			SetPresenceProtocolMessage protocolMessage = new SetPresenceProtocolMessage();
			protocolMessage.Presence = presence;
			protocolMessage.Status = status;
			
			UserProfile userProfile = UserProfile.Instance;
			userProfile.Presence = presence;
			userProfile.Status = status;
			
			return protocolMessage;
		}
		
		protected override void HandleSpecificResponseProtocolMessage ( ProtocolMessage protocolMessage )
		{
		/*	UserProfile userProfile = UserProfile.Instance;
			SetPresenceProtocolMessage setPresenceProtocolMessage = ( SetPresenceProtocolMessage ) protocolMessage;
			
			userProfile.Presence = presence;
			userProfile.Status = status;*/
		}


		
	}
}